/------------------------------------------------------------------------------
 Document about relaxation demosystem effect: "boxGrower" 
 Updated 2017/7/16
 adapt 2017
------------------------------------------------------------------------------/
Generic description:
	The effect is growing tree like structures from selected
	mesh shapes (configured in Skene.qml file) with chosen
	interval and pattern either on a plane or from surfaces
	of any objects (this surfaces emit still TBD!).
	
	Effect is based on seed meshes emitted into the trans VBO.
	These seed meshes emit a copy of itself every emitRateMS time (in
	milliseconds), and also make another branch every branchRateMS (also in
	milliseconds).

Parameters:
/------------------------------------------------------------------------------

The term brancLevel is defined to be 0 for the main branch, 1 for the child
branches of the main branch, 2 for the children of these and so on (increase
by one on each child branching).

-------------------------------------------------------------------------------
.grow.discardEdgeLen
	The whole triangle is discarded when any edge length exceeds this value.
-------------------------------------------------------------------------------
.grow.maxDist
	Maximum distance for the vertices from the origo, after which they are
	discarded.
-------------------------------------------------------------------------------
.grow.emitRateMS
	How often a new box is cloned from the previously last cloned box.
-------------------------------------------------------------------------------
.grow.branchRateMS
	How often a new branch is generated  (MS as in milliseconds) either from
	the	main branch or from	any child branch.
	
.grow.branchRateVar
	The variation of the branch rate MS.
	
.grow.branchRateFreq
	The variation frequency of the branch rate MS.
-------------------------------------------------------------------------------
.grow.maxBranch
    Maximum number of branches done in the main branch. Each child branch has
	each one less of the max branches as their parent (meaning in other words
	that this parameter is decreased one per level).
-------------------------------------------------------------------------------
.grow.maxLevel
    Maximum branch level limiting the number of child recursions to this value.
-------------------------------------------------------------------------------
.grow.maxAgeSec
    Maximum age in seconds for each box since they are emitted.
-------------------------------------------------------------------------------
.grow.maxEmitTimeSec
    Maximum emit time in seconds, if this is for example 10.0 then no
	emits into the whole tree are done after all boxes are older than 10s.
-------------------------------------------------------------------------------
.grow.move
	How much the new emitted box is moved from the previous. Together with
	.grow.emitRateMS forms the growing speed.
	
.grow.moveX, .grow.moveY, .grow.moveZ
	XYZ specific scales for the base move.

	
-------------------------------------------------------------------------------
.grow.movePerLevel
	How much the base move value is modified per each child branch level.
	The move value of the child branch is
	moveChild = move + movePerLevel*branchLevel
-------------------------------------------------------------------------------
.grow.moveOfs
	How much the move goes towards Y-axis in addition to the sincos curve.
-------------------------------------------------------------------------------
.grow.moveOfsPerLevel
    How much the moveOfs value is modified per each child branch level.
-------------------------------------------------------------------------------
.grow.moveFreq
    The frequency for the sincos move curve variation.
-------------------------------------------------------------------------------
.grow.moveFreqVar
	How much the moveFreq is varied (with another sincos curve).
-------------------------------------------------------------------------------
.grow.sca
	How much each emit of a new box scales the previous emitting box. Done only
	once at the emit time. Prefer to keep this close to 1.0
-------------------------------------------------------------------------------
.grow.scaVar
	How much the scale of the emitted box is varied. Prefer to keep this close
	to 0.0
-------------------------------------------------------------------------------
.grow.scaVarFreq
	What is the frequency for the scale variation.
-------------------------------------------------------------------------------
.grow.scaVarPhase
   The phase for the scale variation. (Is this really needed??!?)
-------------------------------------------------------------------------------
.grow.scalePerLevel
   How much the box is scaled with each new child branch. If this is for
   example 0.5, then the first child branch gets 0.5 scale boxes when compared
   to the root size and the child branches of these get 0.25 = 0.5*0.5 scale.
-------------------------------------------------------------------------------
.grow.rot1
   How big the rotation sincos variation amplitude from the main grow dir is on
   YZ plane.
-------------------------------------------------------------------------------
.grow.rot2
   How big the rotation sincos variation amplitude from the main grow dir is on
   XZ plane.
-------------------------------------------------------------------------------
.grow.rot1Level
   How much the rotation variation 1 is modified per branch level.
-------------------------------------------------------------------------------
.grow.rot2Level
   How much the rotation variation 2 is modified per branch level.
-------------------------------------------------------------------------------
.grow.branchAng
.grow.branchAngVar
.grow.branchAngVarFreq
   The angle, variation and the variation frequency of the child branch when
   compared to the parent grow dir. Value of 0.0 is 90 degrees from the parents
   dir, 1.0 is into the parent dir and -1.0 completely against.
-------------------------------------------------------------------------------
.grow.emitMeshScale
	How big mesh is emitted as the seed of the grower.
-------------------------------------------------------------------------------
boxGrower.grow.emitTrack.freq
boxGrower.grow.emitTrack.innerFreq
boxGrower.grow.emitTrack.innerRad
boxGrower.grow.emitTrack.rad
	Control the seed emit track on the XZ plane. TODO later to add surface
	emitter replacing this...

-------------------------------------------------------------------------------
.grow.rotAmount
	How the sincos rotation vs the directional grow is balanced.
	Value of 0.0 is pure directional growth, 1.0 is pure sincos direction.
-------------------------------------------------------------------------------
.grow.rotAmount
	How much the rotAmount changes per branch level.


-------------------------------------------------------------------------------
These params are for move XY, YZ or XZ plane palette gradient.
.grow.movePalAmp  
.grow.movePalAge (how the age of the box effects the palette offset)
.grow.movePalFreq
.grow.movePalFreqLevel (how much base freq increases per branch level)
.grow.movePalOfs
.grow.movePalOfsLevel (how much base ofs increases per branch level)
	 palette gradient defining the grow "plane" (if one of the moveX, Y or Z is set to zero or near zero).
	 Applied with amplitude .grow.movePalAmp and the x offset in palette image is moved in time with
	 .grow.movePalFreq, .grow.movePalFreqLevel, .grow.movePalOfs, .grow.movePalOfsLevel,
	 .grow.movePalAge (how the age of the box effects the palette offset). 
	 The effect for move X, Y and Z is achieved through swizzle of the moveX, moveY & moveZ in following way:
	 (all values from green channel)
	  if palette 0.0 >= .g < 0.333 then moveXYZ (XY plane)
	  if palette 0.333 >= .g < 0.667 then moveZXY (XZ plane)
	  if palette 0.667 >= .g <= 1.0 then moveYZX (YZ plane)
-------------------------------------------------------------------------------	
.grow.maxSca
	How much the maximum scale can be

.grow.maxScaSmooth
	How smoothly the maximum scale is approached:
	0.0 not smoothly at all
	1.0 maximum smoothness
	
	
.grow.moveScale
	Move after emit together when scaling existing ones bigger
	
.grow.maxScaMove
	Maximum move when scaling existing
	
.grow.maxScaMoveSmooth
	Move smoothing when reaching the maximum scale base move:
	0.0 not smooth at all
	1.0 maximum smoothness
	

------------------------------------------------------------------------------/
 
